load("@rules_java//java:defs.bzl", "java_library")
load("//:testing.bzl", "junit4_test_suites")

package(default_applicable_licenses = ["//:license"])

java_library(
    name = "tests",
    testonly = True,
    srcs = glob(["*.java"]),
    resources = [
        "//testing:policy_test_resources",
    ],
    deps = [
        "//:java_truth",
        "//bundle:cel",
        "//bundle:environment",
        "//bundle:environment_yaml_parser",
        "//common:cel_ast",
        "//common:options",
        "//common/formats:value_string",
        "//common/internal",
        "//common/resources/testdata/proto3:standalone_global_enum_java_proto",
        "//common/types",
        "//compiler",
        "//extensions:optional_library",
        "//parser:macro",
        "//parser:parser_factory",
        "//parser:unparser",
        "//policy",
        "//policy:compiler_factory",
        "//policy:parser",
        "//policy:parser_factory",
        "//policy:policy_parser_context",
        "//policy:source",
        "//policy:validation_exception",
        "//runtime",
        "//runtime:function_binding",
        "//runtime:late_function_binding",
        "//testing/protos:single_file_java_proto",
        "@cel_spec//proto/cel/expr/conformance/proto3:test_all_types_java_proto",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_testparameterinjector_test_parameter_injector",
        "@maven//:junit_junit",
        "@maven//:org_yaml_snakeyaml",
    ],
)

junit4_test_suites(
    name = "test_suites",
    sizes = [
        "small",
    ],
    src_dir = "src/test/java",
    deps = [":tests"],
)
